import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);

let admin = {
  path: '/index',
  name: 'index',
  component: require('@/pages/index.vue').default,
  children: [
  
  ]
};

export default new Router({
  // mode: 'history',
  // base: '/sxld', //发布的时候打开注释,history模式需要
  routes: [
    {
      path: '/index',
      name: 'index',
      component: require('@/pages/index.vue').default,
      children: [
        {
          path: '/Census',
          name: 'Census',
          component: require('@/pages/Census/index.vue').default,
          children: [
            {
              path: '/DayBill',
              name: 'DayBill',
              component: require('@/pages/Census/CensusDetail/dayBill.vue').default
            },
            {
              path: '/SecondDetail',
              name: 'SecondDetail',
              component: require('@/pages/Census/CensusDetail/secondDetail.vue').default
            }
          ]
        },

        {
          path: '/Order',
          name: 'Order',
          component: require('@/pages/Order/index.vue').default
        },

        {
          path: '/Device',
          name: 'Device',
          component: require('@/pages/Device/index.vue').default
        },

        {
          path: '/Shop',
          name: 'Shop',
          component: require('@/pages/Shop/index.vue').default,
          children: [
            {
              path: '/Shop-Order',
              name: 'Shop-Order',
              component: require('@/pages/Shop/order.vue').default
            },
            {
              path: '/Shop-Device',
              name: 'Shop-Device',
              component: require('@/pages/Shop/device.vue').default
            },
            {
              path: '/Shop-Manage',
              name: 'Shop-Manage',
              component: require('@/pages/Shop/manage.vue').default
            },
            {
              path: '/Shop-Add',
              name: 'Shop-Add',
              component: require('@/pages/Shop/shop.vue').default
            }
          ]
        },

        {
          path: '/Publicstore',
          name: 'Publicstore',
          component: require('@/pages/Publicstore/index.vue').default,
          children: [
            {
              path: '/Store-Apply',
              name: 'Store-Apply',
              component: require('@/pages/Publicstore/apply.vue').default
            },
            {
              path: '/Store-Record',
              name: 'Store-Record',
              component: require('@/pages/Publicstore/record.vue').default
            },
            {
              path: '/Store-Detail',
              name: 'Store-Detail',
              component: require('@/pages/Publicstore/detail.vue').default
            }
          ]
        },

        {
          path: '/Mine',
          name: 'Mine',
          component: require('@/pages/Mine/index.vue').default
        },
        {
          path: '/AddRole',
          name: 'AddRole',
          component: require('@/pages/Mine/AddRole.vue').default
        },
        {
          path: '/AddShop',
          name: 'AddShop',
          component: require('@/pages/Mine/AddShop.vue').default
        },
        {
          path: '/Agent',
          name: 'Agent',
          component: require('@/pages/Mine/Agent.vue').default
        },
        {
          path: '/Channel',
          name: 'Channel',
          component: require('@/pages/Mine/Channel.vue').default
        },
        {
          path: '/Sales',
          name: 'Sales',
          component: require('@/pages/Mine/Sales.vue').default
        },
        {
          path: '/Shoper',
          name: 'Shoper',
          component: require('@/pages/Mine/Shoper.vue').default
        },
        {
          path: '/SetPass',
          name: 'SetPass',
          component: require('@/pages/Mine/SetPass.vue').default
        },

        {
          path: '/CashLog',
          name: 'CashLog',
          component: require('@/pages/Mine/CashLog.vue').default
        },
        {
          path: '/CashOut',
          name: 'CashOut',
          component: require('@/pages/Mine/CashOut.vue').default
        },
        {
          path: '/CashApprove',
          name: 'CashApprove',
          component: require('@/pages/Mine/CashApprove.vue').default
        },
        {
          path: '/AuthPage',
          name: 'AuthPage',
          component: require('@/pages/Mine/AuthPage.vue').default
        },
        {
          path: '/SupUser',
          name: 'SupUser',
          component: require('@/pages/Mine/SupUser.vue').default
        },
        {
          path: '/AddSuper',
          name: 'AddSuper',
          component: require('@/pages/Mine/AddSuper.vue').default
        },
        {
          path: '/SaleScore',
          name: 'SaleScore',
          component: require('@/pages/Mine/SaleScore.vue').default
        },
        {
          path: '/SaleStore',
          name: 'SaleStore',
          component: require('@/pages/Mine/SaleStore.vue').default
        },
        {
          path: '/Dstore',
          name: 'Dstore',
          component: require('@/pages/Mine/Dstore.vue').default
        },
      ]
    },

    {
      path: "/*",
      name: 'login',
      component: require('@/pages/login.vue').default
    }
  ]
});
